package zhaowenpu;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import zhaowenpu.bean.Students;
import zhaowenpu.dao.Userlnfo;
import zhaowenpu.dao.Userlnfolmpl;
@WebServlet("/SeachByName")
public class SeachByName extends HttpServlet{
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String stuName=req.getParameter("stuname");
		Userlnfo ui= new Userlnfolmpl();
		List<Students> checkByNameStu=ui.checkByNameStu(stuName);
		HttpSession session=req.getSession();
		session.setAttribute("STUDENTS", checkByNameStu);
		resp.sendRedirect("succes.jsp");
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.doPost(req, resp);
	}

}
